package com.vm.osm.business.dao;

import com.vm.osm.business.dto.rsp.orderInst.*;
import com.vm.osm.business.entity.OsmCheckPlanInst;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by chenzui on 2018/3/13.
 */
public interface OsmCheckPlanInstMapper extends BaseDao<OsmCheckPlanInst,String> {
    public TaskOrderInfo queryOrderInfoById(@Param("id") String id);

    public List<ContentType> queryTypesByContentId(@Param("contentId") String contentId);

    public List<TaskItem> queryTaskItemByTypeId(@Param("typeId") String typeId);

    public List<Kpi> queryKpis(@Param("orderId") String orderId,@Param("itemId") String itemId);

    public List<KpiValues> getKpiValuesById(@Param("kpiId") String kpiId,@Param("kpiVersion") String kpiVersion);

    public List queryChooseValue(@Param("kpiId") String kpiId,@Param("orderId") String orderId,
                                 @Param("itemId") String itemId);

    public OsmCheckPlanInst selectFirst(@Param("checkPlanId") String checkPlanId);

    /**
     * 查询某个员工各类状态的故障单数量
     * @param staffId
     * @return
     */
    public List<Map<String,Long>> queryStatus(@Param("staffId") String staffId);

    /**
     *
     * @param staffId
     * @return
     */
    public Long queryCatch(@Param("staffId") String staffId);

    public void deleteKpi(@Param("orderId") String orderId);

    /**
     * 根据部门查询
     * @param departmentId
     * @return
     */
    public List<Map<String,Long>> queryStatusByDept(@Param("departmentId") String departmentId,@Param("enterpriseId") String enterpriseId);
}
